#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int removeDuplicates(int* nums, int numsSize)
{
    int dst = 0, src = 1;
    while (src < numsSize)
    {
        if (nums[dst] != nums[src])
        {
            nums[++dst] = nums[src];
        }
        src++;
    }
    return dst + 1;
}


int main()
{
    int arr[] = { 0,0,1,1,1,2,2,3,3,4 };
    printf("%d\n", removeDuplicates(arr, 10));
    return 0;
}